package bb.lanxing.lib.devices.ble.ble.characteristic;

import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
//import com.umeng.analytics.pro.an;
import bb.lanxing.lib.devices.ble.ble.base.BaseBleCharacteristic;
import bb.lanxing.lib.devices.ble.ble.base.BaseBleService;
import bb.lanxing.lib.devices.core.ble.SpecificationAttributes;
import java.util.UUID;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;

public final class BatteryCharacteristics extends BaseBleCharacteristic {
    private Integer battery;

    public BatteryCharacteristics(BaseBleService bleService) {
        super(bleService);
        Intrinsics.checkNotNullParameter(bleService, "bleService");
    }

    public Integer getBattery() {
        return this.battery;
    }

    public void setBattery(Integer num) {
        this.battery = num;
    }

    @Override
    public UUID targetUUID() {
        UUID BLE_BATTERY_CHARACTERISTIC = SpecificationAttributes.BLE_BATTERY_CHARACTERISTIC;
//        Intrinsics.checkNotNullExpressionValue(BLE_BATTERY_CHARACTERISTIC, "BLE_BATTERY_CHARACTERISTIC");
        return BLE_BATTERY_CHARACTERISTIC;
    }

    @Override
    public void onValueUpdate(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
//        Intrinsics.checkNotNullParameter(gatt, "gatt");
//        Intrinsics.checkNotNullParameter(characteristic, "characteristic");
        this.battery = characteristic.getIntValue(17, 0);
    }
}
